ENT.Type = "point"
ENT.Timer = 0

function ENT:Initialize()
	GameInfo.MerchantTrace = true
end

function ENT:KeyValue(key, value)
end

function ENT:Think()
	if self.Timer < CurTime() then
		self.Timer = CurTime() + 2
		self:RadTrace()
	end
end

function ENT:RadTrace()
	for k,v in pairs(team.GetPlayers(TEAM_HUMANS)) do
		if v:GetPos():Distance(self:GetPos()) < 1500 then
			if v.RadiationTimer then 
				if v.RadiationTimer < CurTime() then
					local chance = 40
					if v:Health() != v.MaxHealth then
						chance = 30
					end
					if v:Health() < v.MaxHealth / 2 or v.Cutter or v.Infector then
						chance = 20
					end
					if math.random(1,chance) == 1 then
						v:DoPoison()
						v:ClientSound(ChooseRandom(GameSounds.Geiger))
					else
						v:ClientSound(ChooseRandom(GameSounds.Geiger))
					end
					v.RadiationTimer = CurTime() + 1.9
					if v.FvoxDelay then
						if v.FvoxDelay < CurTime() then
							v:ClientSound(FVOX.Radiation)
							v.FvoxDelay = CurTime() + 15
						end
					else
					v.FvoxDelay = CurTime() + 5
					end
				end
			else
				v.RadiationTimer = CurTime() + 1
			end
		end
	end
end
